// import api
const state = {
  count: 10
}
// getters
const getters = {
  count: state => state.count
}

// actions
const actions = {
  inc ({ commit, state }, num) {
    commit('inc', { num })
  }
}

// mutations
const mutations = {
  inc (state, { num }) {
    state.count = state.count + num
  }
}

export default {
  namespaced: true,
  state,
  getters,
  actions,
  mutations
}
